package com.linkwedo.saas.project;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;

import com.linkwedo.saas.domain.Project;
import com.linkwedo.saas.domain.Target;
import com.linkwedo.saas.domain.member.User;
import com.linkwedo.saas.users.UserService;
import com.opensymphony.xwork2.ActionSupport;

public class PrepareForAddTaskAction extends ActionSupport implements ServletRequestAware{
	private static final long serialVersionUID = 8190003683775267839L;
	List<Project> list;
	List<Target> targetlist;
	List<User> userlist;
	private ProjectService projectService;
	private UserService userService;
	private TargetService targetService;
	
	public ProjectService getProjectService() {
		return projectService;
	}

	public void setProjectService(ProjectService projectService) {
		this.projectService = projectService;
	}
	public javax.servlet.http.HttpServletRequest getRequest() {
		return request;
	}

	public void setRequest(javax.servlet.http.HttpServletRequest request) {
		this.request = request;
	}

	private javax.servlet.http.HttpServletRequest request;

	public List<Project> getList() {
		return list;
	}

	public void setList(List<Project> list) {
		this.list = list;
	}


	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	public String execute() throws Exception {
		list=getProjectService().findAll();
		targetlist = getTargetService().findAll();
		userlist = getUserService().findAll();	
	    return "addtask";
	}

	@Override
	public void setServletRequest(HttpServletRequest arg0) {
		// TODO Auto-generated method stub
		this.request = arg0;
		
	}

	public List<Target> getTargetlist() {
		return targetlist;
	}

	public void setTargetlist(List<Target> targetlist) {
		this.targetlist = targetlist;
	}

	public List<User> getUserlist() {
		return userlist;
	}

	public void setUserlist(List<User> userlist) {
		this.userlist = userlist;
	}

	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public TargetService getTargetService() {
		return targetService;
	}

	public void setTargetService(TargetService targetService) {
		this.targetService = targetService;
	}
}
